package jfrederick8;

/**
 * This class represents anything which can be picked up by characters. This could include Armor/Weapons or single-use items such as health items.
 * 
 * @author John Frederick
 * @version 1.0 12-14-2011
 */
public abstract class Item {
	protected String name, description, type;
	protected int value, rarity, uses, effect, effectDuration, factionRestriction, classRestriction, proficiencyRestriction, proficiencyMin;
	protected boolean equipped, sellable;
	protected int[] stats;
	//Icon? itemIcon
	
	/**
	 * This constructor allocates the numerous variable attributed to items collected by characters
	 * 
	 * @param stats represents any effect on the holders stats which may be in effect
	 * @param name represents the name of the item
	 * @param description tells what the item is intended to do
	 * @param type tells the specific type of the item such as 'Blade' or 'Helmet'
	 * @param value tells how much this item would cost if the player bought it at a store
	 * @param rarity tells how often the item should appear in the game
	 * @param effect any temporary effects which may be activated by this item. Ex: Poison
	 * @param effectDuration the time an effect will last
	 * @param factionRestriction sets the restriction of the use of the item to someone in a certain faction
	 * @param classRestriction restricts the use of the item to a certain class
	 * @param proficiencyRestriction restricts the use of the item until someone is fully trained in the relevant skill
	 * @param proficiencyMin sets the minimum of a proficiency restriction
	 * @param equipped tells whether stats changes or effects should be active
	 * @param sellable restricts certain items from being sold
	 * @param uses limits the number of times which an item may be used.
	 */
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction, int classRestriction, int proficiencyRestriction, int proficiencyMin, boolean equipped, boolean sellable, int uses){
		this.stats = stats;
		this.name = name;
		this.description = description;
		this.type = type;
		this.equipped = equipped;
		this.value = value;
		this.rarity = rarity;
		this.uses = uses;
		this.effect = effect;
		this.effectDuration = effectDuration;
		this.factionRestriction = factionRestriction;
		this.classRestriction = classRestriction;
		this.proficiencyRestriction = proficiencyRestriction;
		this.proficiencyMin = proficiencyMin;
	}//end constructor Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction, int classRestriction, int proficiencyRestriction, int proficiencyMin, boolean equipped, boolean sellable){
		this(stats,name,description,type,value,rarity,effect,effectDuration,factionRestriction,classRestriction,proficiencyRestriction, proficiencyMin, equipped, sellable, 50 - (5*value));
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction, int classRestriction, int proficiencyRestriction, int proficiencyMin, boolean equipped){
		this(stats,name,description,type,value,rarity,effect,effectDuration,factionRestriction,classRestriction,proficiencyRestriction, proficiencyMin, equipped, true);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction, int classRestriction, int proficiencyRestriction, int proficiencyMin){
		this(stats,name,description,type,value,rarity,effect,effectDuration,factionRestriction,classRestriction,proficiencyRestriction, proficiencyMin, false);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction, int classRestriction, int proficiencyRestriction){
		this(stats,name,description,type,value,rarity,effect,effectDuration,factionRestriction,classRestriction,proficiencyRestriction, (Integer)null);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction, int classRestriction){
		this(stats,name,description,type,value,rarity,effect,effectDuration,factionRestriction,classRestriction,(Integer)null);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration, int factionRestriction){
		this(stats,name,description,type,value,rarity,effect,effectDuration,factionRestriction,0);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect, int effectDuration){
		this(stats,name,description,type,value,rarity,effect,effectDuration,0);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity, int effect){
		this(stats,name,description,type,value,rarity,effect,(Integer)null);
	}//end chain Item
	public Item(int[] stats, String name, String description, String type, int value, int rarity){
		this(stats,name,description,type,value,rarity,(Integer)null);
	}//end chain Item
}//end class Item
